package com.sqlcheck.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("projects")
public class Project {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("gitlab_project_id")
    private Long gitlabProjectId;

    @TableField("name")
    private String name;

    @TableField("path")
    private String path;

    @TableField("description")
    private String description;

    @TableField("web_url")
    private String webUrl;

    @TableField("clone_url")
    private String cloneUrl;

    @TableField("default_branch")
    private String defaultBranch;

    @TableField("visibility")
    private String visibility;

    @TableField("owner_id")
    private Long ownerId;

    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @TableField(value = "updated_at", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    @TableLogic
    @TableField("deleted")
    private Boolean deleted;
}